﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:m="clr-namespace:Signum.Windows">

	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="PickerBase.generic.xaml" />
	</ResourceDictionary.MergedDictionaries>
	<Style  TargetType="{x:Type m:DateTimePicker}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type m:DateTimePicker}">
					<m:PickerBase x:Name="PART_PickerBase"
					Background="{TemplateBinding Background}" 
					BorderBrush="{TemplateBinding BorderBrush}">
						<m:PickerBase.PopupContent>
							<Calendar x:Name="PART_DatePickerCalendar"
							 IsEnabled="{TemplateBinding IsReadOnly}" 
                             SelectionMode="SingleDate"/> <!--SelectedDate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedDate, Mode=TwoWay}"-->
						</m:PickerBase.PopupContent>
						<m:PickerBase.ButtonContent>
							<TextBox x:Name="PART_EditableTextBox" 
							Margin="{TemplateBinding Padding}" 
							IsReadOnly="{TemplateBinding IsReadOnly}" 
							Style="{StaticResource ComboBoxEditableTextBox}" />
                            <!--Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedDate, ValidatesOnExceptions=true, NotifyOnValidationError=true, UpdateSourceTrigger=PropertyChanged}"-->
                        </m:PickerBase.ButtonContent>
					</m:PickerBase>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>